<template>
  <div class="about">
    <h1 v-if="data">{{ data.city }}</h1>
    <h2 v-if="data">{{ data.alarms[0].alarmContent }}</h2>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: null,
    };
  },
  methods: {
    getData(id) {
      this.axios.post(`/jiekou?cityIds=${id}`).then((res) => {
        this.data = res.data.value[0];
        console.log(this.data);
      });
    },
  },
  mounted() {
    this.getData(101020100);
  },
};
</script>